package com.ruoyi.project.xkx.order.mapper;

import java.util.List;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.project.system.domain.SysUser;
import com.ruoyi.project.xkx.order.domain.ClassStudent;
import com.ruoyi.project.xkx.order.domain.XkOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.project.xkx.order.domain.YsOrder;
import com.ruoyi.project.xkx.school.domain.XkxClass;
import com.ruoyi.project.xkx.school.domain.XkxClassStudent;

/**
 * 消课订单Mapper接口
 * 
 * @author 闫阳光
 * @date 2021-05-13
 */
public interface XkOrderMapper extends BaseMapper<XkOrder>
{
    /**
     * 查询消课订单
     *
     * @param xkId 消课订单ID
     * @return 消课订单
     */
    public XkOrder selectXkOrderById(Long xkId);

    /**
     * 查询消课订单列表
     *
     * @param xkOrder 消课订单
     * @return 消课订单集合
     */
    public List<XkOrder> selectXkOrderList(XkOrder xkOrder);

    /**
     * 新增消课订单
     * 
     * @param xkOrder 消课订单
     * @return 结果
     */
    public int insertXkOrder(XkOrder xkOrder);

    /**
     * 修改消课订单
     *
     * @param xkOrder 消课订单
     * @return 结果
     */
    public int updateXkOrder(XkOrder xkOrder);

    /**
     * 删除消课订单
     *
     * @param xkId 消课订单ID
     * @return 结果
     */
    public int deleteXkOrderById(Long xkId);

    /**
     * 批量删除消课订单
     *
     * @param xkIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteXkOrderByIds(Long[] xkIds);

    List<XkOrder> getXkOrderListByPage(XkOrder xkOrder);

    List<SysUser> getTeacherList();

    Page<XkOrder> getXkOrderListByPage1(Page<YsOrder> page, Integer userId,String xkDate);

    List<XkxClassStudent> getClassStudentHours(Integer classId);

    /**
     * 根据班级Id查询 班级所讲课程课程价格
     * 作用：计算下课订单价格
     * @param classId
     * @return
     */
    XkxClass getClassDeCourseAndPrice(Integer classId);

    List<XkxClassStudent> getStudentHours(Integer classId);
}
